<template>

  <el-tooltip effect="light" content="全屏" placement="bottom">
    <div class="container" @click="click">
      <i class="fa fa-arrows-alt" />
    </div>
  </el-tooltip>

</template>

<script>
import screenfull from 'screenfull'

export default {
  name: 'Screenfull',
  data() {
    return {
      isFullscreen: false
    }
  },

  methods: {
    click() {
      if (!screenfull.enabled) {
        this.$message({
          message: 'you browser can not work',
          type: 'warning'
        })
        return false
      }
      screenfull.toggle()
    }

  }
}
</script>

<style scoped>
.container{
  width:40px;
  height:50px;
  line-height:50px;
  text-align:center;
  cursor:pointer;

}
.container:hover{
  background-color: #eeeeee;
}
</style>
